#pragma once
class BaseState;

class StateManager
{
// variables
private:
	vector<BaseState*> currentStates;

// functions
private:
	//**********************************************************************//
	//	Singleton															//
	//**********************************************************************//
	StateManager(void);
	StateManager(StateManager&);
	~StateManager(void);
	StateManager& operator=(StateManager&);

public:
	static StateManager* GetInstance() { static StateManager instance; return &instance; }
	//**********************************************************************//

	void Shutdown();
	void ChangeState(BaseState* _state, bool _whipe = false);
	void Push(BaseState* _state);
	void Pop();
	void Update(float _dt);

	void Render();

	bool IsStateActive(const BaseState* _state);

	BaseState* GetCurrentTopState() { if (currentStates.size()) return currentStates.back(); return NULL; }
};

DECLARE_SINGLETON_H(StateManager);